<ul nz-menu [nzMode]="'horizontal'" class="nav">
    <li nz-menu-item class="" routerLink="/widgets/widgets" [routerLinkActive]="['ant-menu-item-selected']"
        style="outline: none">
        <a style="outline: none">班级管理</a>
    </li>
    <li nz-menu-item routerLink="/widgets/student" [routerLinkActive]="['ant-menu-item-selected']"
        style="outline: none">
        <a style="outline: none">学生管理</a>
    </li>
</ul>

<div class="stuseach" style="padding:15px 0;position:relative;overflow: hidden">
    <button nz-button [nzType]="'primary'" style="float: left" (click)="resetPwd()"><i class="anticon anticon-unlock"></i>重置密码</button>

    <nz-input [nzPlaceHolder]="'请输入您要搜索的学生姓名'" [(ngModel)]="_value"
              style="width: 300px;float: right;margin-right: 3px;"></nz-input>
    <button style="position: absolute;right: 5px;top: 17px;background: #fff;border: 0;outline: none;width: 24px;height: 24px;cursor: pointer;" (click)="doSearch()"><i class="anticon anticon-search"></i></button>
</div>

<nz-table #nzTable [nzDataSource]="data" [nzPageSize]="10" (nzDataChange)="_displayDataChange($event)"
          (nzPageIndexChange)="_refreshStatus()" (nzPageSizeChange)="_refreshStatus()" [nzTotal]="total">
    <thead nz-thead>
    <tr>
        <th nz-th nzCheckbox>
            <label nz-checkbox [(ngModel)]="_allChecked" [nzIndeterminate]="_indeterminate"
                   (ngModelChange)="_checkAll($event)">
            </label>
        </th>
        <th nz-th>
            <span>学生名称</span>
            <nz-table-sort [(nzValue)]="sortMap.stu_name" (nzValueChange)="sort('stu_name',$event)"></nz-table-sort>
        </th>
        <th nz-th>
            <span>专业名称</span>
            <nz-table-sort [(nzValue)]="sortMap.major_name" (nzValueChange)="sort('major_name',$event)"></nz-table-sort>
        </th>
        <th nz-th>
            <span>班级名称</span>
            <nz-table-sort [(nzValue)]="sortMap.cla_name" (nzValueChange)="sort('cla_name',$event)"></nz-table-sort>
        </th>
        <th nz-th>
            操作
        </th>
    </tr>
    </thead>
    <tbody nz-tbody>
    <tr nz-tbody-tr *ngFor="let data of nzTable.data">
        <td nz-td nzCheckbox>
            <label nz-checkbox [(ngModel)]="data.checked" (ngModelChange)="_refreshStatus($event)">
            </label>
        </td>
        <td nz-td>{{data.stu_name}}</td>
        <td nz-td>{{data.major_name}}</td>
        <td nz-td>{{data.cla_name}}</td>

        <td>
            <a (click)="isDelstu(data)">删除</a>
        </td>
    </tr>
    </tbody>
</nz-table>

<nz-modal [nzWrapClassName]="'vertical-center-modal'" [nzFooter]="'true'" [nzVisible]="isRemove" [nzTitle]="'提示'"
          [nzContent]="removeContent" (nzOnCancel)="isRemove=false" (nzOnOk)="deleteStu()"
          [nzStyle]="style" [nzOkText]="'确定'" [nzCancelText]="'取消'" >
    <ng-template #removeContent>
        <p>是否删除 <b>{{ removeStuName }}</b> 同学？</p>
    </ng-template>
</nz-modal>
